package com.example.yuejian.fragment;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.blankj.utilcode.util.ActivityUtils;
import com.example.yuejian.R;
import com.example.yuejian.activity.ClubActivity;
import com.example.yuejian.activity.MyActivity;
import com.example.yuejian.activity.STActivity;
import com.example.yuejian.activity.TrainActivity;

import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

public class OtherFragment extends Fragment {
    public static OtherFragment newInstance() {

        Bundle args = new Bundle();

        OtherFragment fragment = new OtherFragment();

        fragment.setArguments(args);
        return fragment;
    }@Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }
    private Unbinder unbinder;
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {

        View view = inflater.inflate(R.layout.fragment_bs, container, false);
        unbinder = ButterKnife.bind(this, view);

        return view;
    }

    @OnClick(R.id.train)
    void train() {

        ActivityUtils.startActivity(TrainActivity.class);

    }

    @OnClick(R.id.my)
    void my() {

        ActivityUtils.startActivity(MyActivity.class);

    }

    @OnClick(R.id.club)
    void club() {

        ActivityUtils.startActivity(ClubActivity.class);

    }

    @OnClick(R.id.st)
    void st() {
        ActivityUtils.startActivity(STActivity.class);

    }

}
